// 所有的api

import { get, post } from './http'

//一、 菜单管理
// 菜单添加
export let reqmenuadd = (params) => post('/api/menuadd', params)
// 菜单列表
export let reqmenulist = (params) => get('/api/menulist', params)
// 菜单详情
export let reqmenuinfo = (params) => get('/api/menuinfo', params)
// 菜单修改
export let reqmenuedit = (params) => post('/api/menuedit', params)
// 菜单删除
export let reqmenudelete = (params) => post('/api/menudelete', params)

//二、 角色管理
// 角色添加
export const reqroleadd = (params) => post('/api/roleadd', params)
// 角色列表
export const reqrolelist = (params) => get('/api/rolelist', params)
//角色获取(一条)
export const reqroleinfo = (params) => get('/api/roleinfo', params)
//角色修改
export const reqroleedit = (params) => post('/api/roleedit', params)
// 角色删除
export const reqroledelete = (params) => post('/api/roledelete', params)

//三、管理员管理
// 1.管理员添加** 
export const requseradd = (params) => post('/api/useradd', params)
//2.管理员总数 
export const requsercount = (params) => get('/api/usercount', params)
// 3.管理员列表（分页）** 
export const requserlist = (params) => get('/api/userlist', params)
// 4.管理员获取（一条）
export const requserinfo = (params) => get('/api/userinfo', params)
// 5.管理员修改
export const requseredit = (params) => post('/api/useredit', params)
// 6.管理员删除
export const requserdelete = (params) => post('/api/userdelete', params)
// 7.管理员登录
export const requserlogin = (params) => post('/api/userlogin', params)

// 四、商品分类管理
// 1.商品分类添加** 
export const reqcateadd = (params) => post('/api/cateadd', params,true)
//2.商品分类获取（一条） 
export const reqcateinfo = (params) => get('/api/cateinfo', params)
// 3.商品分类列表（分页）** 
export const reqcatelist = (params) => get('/api/catelist', params)
// 4.商品分类修改
export let reqcateedit = (params) => post("/api/cateedit", params,true)
// 5.商品分类删除
export const reqcatedelete = (params) => post('/api/catedelete', params)

//五、 商品规格

// 1.商品规格添加
export const reqspecsadd = (params) => post('/api/specsadd', params)
//2.商品规格总数 
export const reqspecscount = () => get('/api/specscount')
// 3.商品规格列表（分页） 
export const reqspecslist = (params) => get('/api/specslist', params)
// 4.商品规格获取（一条）
export const reqspecsinfo = (params) => get('/api/specsinfo', params)
// 5.商品规格修改
export const reqspecsedit = (params) => post('/api/specsedit', params)
// 6.商品规格删除
export const reqspecsdelete = (params) => post('/api/specsdelete', params)

//六. 商品管理
// 1.商品添加
export const reqgoodsadd = (params) => post('/api/goodsadd', params,true)
//2.商品总数 
export const reqgoodscount = (params) => get('/api/goodscount', params)
// 3.商品列表（分页）
export const reqgoodslist = (params) => get('/api/goodslist', params)
// 4.商品获取（一条）
export const reqgoodsinfo = (params) => get('/api/goodsinfo', params)
// 5.商品修改
export const reqgoodsedit = (params) => post('/api/goodsedit', params,true)
// 6.商品删除
export const reqgoodsdelete = (params) => post('/api/goodsdelete', params)

// 七.会员管理
// 1.会员列表
export const reqmemberlist = (params) => get('/api/memberlist', params)
// 2.会员获取(一条)
export const reqmemberinfo = (params) => get('/api/memberinfo', params)
// 3.会员修改
export const reqmemberedit = (params) => post('/api/memberedit', params)

// 八、轮播图管理
// 1.轮播图添加 
export const reqbanneradd = (params) => post('/api/banneradd', params,true)
//2.轮播图获取（一条） 
export const reqbannerinfo = (params) => get('/api/bannerinfo', params)
// 3.轮播图列表（分页）
export const reqbannerlist = (params) => get('/api/bannerlist', params)
// 4.轮播图修改
export let reqbanneredit = (params) => post("/api/banneredit", params,true)
// 5.轮播图删除
export const reqbannerdelete = (params) => post('/api/bannerdelete', params)


// 九，限时秒杀管理
// 1.限时秒杀添加
export const reqseckadd = (params) => post('/api/seckadd', params)
// 2.限时秒杀列表
export const reqsecklist = (params) =>get('/api/secklist', params)
// 3.限时秒杀获取(一条)
export const reqseckinfo = (params) => get('/api/seckinfo', params)
// 4.限时秒杀修改
export const reqseckedit = (params) => post('/api/seckedit', params)
// 5.限时秒杀删除
export const reqseckdelete = (params) => post('/api/seckdelete', params)




